import api from "../model/api";
import axios from "../model/axios";

export  const  busLineQuery  = (params?:any)=>{
    return  axios({
        method:"get",
        url:api.bus.busLine,
        params
    })
}

export  const  busLineDetail = (id:any)=>{
  return  axios({
      method:"get",
      url:api.bus.busLinedetail+id,
  })
}
//  站点信息查询
export  const  stopListQuery  = (params:any)=>{
  return  axios({
      method:"get",
      url:api.bus.stoplist,
      params
  })
}

// 新增订单
export  const  orderAdd = (data:any)=>{
  return  axios({
      method:"post",
      url:api.bus.orderadd,
      data,
      headers:{
          Authorization:window.localStorage.getItem("token")
      }
  })
}
// 订单支付
export  const  pay = (data:any)=>{
  return  axios({
      method:"post",
      url:api.bus.payticket,
      data,
  })
}

// 订单查询
export  const  orderQuery = (params:any)=>{
  return  axios({
      method:"get",
      url:api.bus.orderlist,
      params,
      headers:{
          Authorization:window.localStorage.getItem("token")
      }
  })
}